package cn.net.isir.dao;

import cn.net.isir.core.BasicDao;
import cn.net.isir.entity.Organizations;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class OrganizationsDao extends BasicDao<Organizations> {

    /**
     * 查询当下所有id的子组织机构
     *
     * @param id id
     * @return 列表
     */
    public List<Organizations> selectSubList(String id) {
        Organizations organizations = new Organizations();
        organizations.setId(id);
        List<Organizations> organizationsList =
                sqlSessionTemplate.selectList(getNamespace() + ".selectSubList", organizations);
        return organizationsList;
    }
}
